package com.woniuxy.mesboot.controller;

import com.woniuxy.mesboot.entity.SysCustomer;
import com.woniuxy.mesboot.service.CustomerService;
import com.woniuxy.mesboot.util.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @author : 黑川
 * @version : 1.0
 * @Project : mes-boot
 * @Package : com.woniuxy.mesboot.controller
 * @ClassName : .java
 * @createTime : 2023/5/24 12:19
 * @Description :
 */
@RestController
@RequestMapping("cus")
public class CustomerController {
    @Resource
    private CustomerService customerService;
    @PostMapping("queryAll")
    public Result queryAll(){
        List<SysCustomer> list = customerService.selectAll();
        return Result.ok().data("list",list);
    }
}
